package cn.hdu.liang.common.web.session;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;

/**
 * Session供应接口
 */
public interface SessionProvider {
    //往Session设置值
    public void setAttribute(HttpServletRequest req, String name, Object value);

    //从Session中取值
    public Serializable getAttribute(HttpServletRequest req, String name);

    //退出登录
    public void logout(HttpServletRequest req);

    //获取SessionID
    public String getSessionId(HttpServletRequest req);
}
